package com.shangxian.giveithome.code;

public enum QrCode implements Code {

    WX_QR_CODE_ERROR(false, 60001, "小程序码获取失败"),
    WX_PAGE_NOT_DATA(false, 41030, "所传page页面不存在，或者小程序没有发布"),
    FREQUENCY_ERROR(false, 45009, "调用分钟频率受限(目前5000次/分钟，会调整)，如需大量小程序码，建议预生成。"),;

    private boolean success;

    private Integer code;

    private String message;

    QrCode(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
